package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;

/**
 * The persistent class for the PRESENTANTE database table.
 * 
 */
@Entity
@Table(name = "PRESENTANTE")
public class Presentante implements Serializable {
	private static final long serialVersionUID = 1L;
	private PresentantePK id;
	private String aaTituAnte;
	private String agntSync;
	private String apeMat;
	private String apePat;
	private String curPres;
	private String nombreInst;
	private String nombres;
	private String nuDoc;
	private String nuTituAnte;
	private String tiDocu;
	private String tipoPer;
	private Date tsPres;
	private Date tsUltSync;
	private TmAreaRegistral tmAreaRegistral;

	// @ DANNY:inicio - 06/05/13

	private TmInstSir tmInstSir;
	private Titulo titulo;

	// @ DANNY:fin

	public Presentante() {
	}

	@EmbeddedId
	public PresentantePK getId() {
		return this.id;
	}

	public void setId(PresentantePK id) {
		this.id = id;
	}

	@Column(name = "AA_TITU_ANTE", length = 4)
	public String getAaTituAnte() {
		return this.aaTituAnte;
	}

	public void setAaTituAnte(String aaTituAnte) {
		this.aaTituAnte = aaTituAnte;
	}

	@Column(name = "AGNT_SYNC", length = 4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}

	@Column(name = "APE_MAT", length = 40)
	public String getApeMat() {
		return this.apeMat;
	}

	public void setApeMat(String apeMat) {
		this.apeMat = apeMat;
	}

	@Column(name = "APE_PAT", length = 40)
	public String getApePat() {
		return this.apePat;
	}

	public void setApePat(String apePat) {
		this.apePat = apePat;
	}

	@Column(name = "CUR_PRES", length = 14)
	public String getCurPres() {
		return this.curPres;
	}

	public void setCurPres(String curPres) {
		this.curPres = curPres;
	}

	@Column(name = "NOMBRE_INST", length = 100)
	public String getNombreInst() {
		return this.nombreInst;
	}

	public void setNombreInst(String nombreInst) {
		this.nombreInst = nombreInst;
	}

	@Column(length = 40)
	public String getNombres() {
		return this.nombres;
	}

	public void setNombres(String nombres) {
		this.nombres = nombres;
	}

	@Column(name = "NU_DOC", length = 12)
	public String getNuDoc() {
		return this.nuDoc;
	}

	public void setNuDoc(String nuDoc) {
		this.nuDoc = nuDoc;
	}

	@Column(name = "NU_TITU_ANTE", length = 8)
	public String getNuTituAnte() {
		return this.nuTituAnte;
	}

	public void setNuTituAnte(String nuTituAnte) {
		this.nuTituAnte = nuTituAnte;
	}

	@Column(name = "TI_DOCU", length = 2)
	public String getTiDocu() {
		return this.tiDocu;
	}

	public void setTiDocu(String tiDocu) {
		this.tiDocu = tiDocu;
	}

	@Column(name = "TIPO_PER", nullable = false, length = 1)
	public String getTipoPer() {
		return this.tipoPer;
	}

	public void setTipoPer(String tipoPer) {
		this.tipoPer = tipoPer;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "TS_PRES")
	public Date getTsPres() {
		return this.tsPres;
	}

	public void setTsPres(Date tsPres) {
		this.tsPres = tsPres;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}

	// bi-directional many-to-one association to TmAreaRegistral
	@ManyToOne
	@JoinColumn(name = "AREA_REG_ID", nullable = false, insertable = false, updatable = false)
	public TmAreaRegistral getTmAreaRegistral() {
		return this.tmAreaRegistral;
	}

	public void setTmAreaRegistral(TmAreaRegistral tmAreaRegistral) {
		this.tmAreaRegistral = tmAreaRegistral;
	}

	
	
	// @ DANNY:inicio - 06/05/13
	//bi-directional many-to-one association to TmInstSir
	@ManyToOne
	@JoinColumns({
			@JoinColumn(name = "PRES_REG_PUB_ID", referencedColumnName = "REG_PUB_ID", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "PRES_OFIC_REG_ID", referencedColumnName = "OFIC_REG_ID", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "CUR_PRES", referencedColumnName = "CUR_PRES", nullable = false, insertable = false, updatable = false), })
	public TmInstSir getTmInstSir() {
		return this.tmInstSir;
	}

	public void setTmInstSir(TmInstSir tmInstSir) {
		this.tmInstSir = tmInstSir;
	}

	//bi-directional many-to-one association to Titulo
	@ManyToOne
	@JoinColumns({
			@JoinColumn(name = "PRES_REG_PUB_ID", referencedColumnName = "PRES_REG_PUB_ID", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "PRES_OFIC_REG_ID", referencedColumnName = "PRES_OFIC_REG_ID", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "AA_HOJA_PRES", referencedColumnName = "AA_HOJA_PRES", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "NUM_HOJA_PRES", referencedColumnName = "NUM_HOJA_PRES", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "SISTEMA_ID", referencedColumnName = "SISTEMA_ID", nullable = false, insertable = false, updatable = false) })
	public Titulo getTitulo() {
		return titulo;
	}

	public void setTitulo(Titulo titulo) {
		this.titulo = titulo;
	}

	// @DANNY:fin

}